# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=mycroft-embedded-shell
pkgver=0_git20211005
pkgrel=0
_commit="c2855bffe17cd346397909bf84842eca2d15bd39"
pkgdesc="A MyCroft GUI app which is intended to run on low power hardware"
url="https://github.com/OpenVoiceOS/mycroft-embedded-shell"
# armhf blocked by extra-cmake-modules
# s390x and riscv64 blocked by polkit -> plasma-pa
# ppc64le blocked by qt5-qtwebview
arch="all !armhf !s390x !riscv64 !ppc64le"
license="Apache-2.0"
depends="plasma-pa"
makedepends="
	extra-cmake-modules
	kdbusaddons-dev
	ki18n-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	qt5-qtwebview-dev
	"
source="https://github.com/OpenVoiceOS/mycroft-embedded-shell/archive/$_commit/mycroft-embedded-shell-$_commit.tar.gz"
options="!check" # No tests
builddir="$srcdir/$pkgname-$_commit"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
5b7e664e27234d5ee29401f5525b7d19e2b39c58cd5da9c4b8496f0527e7fcd9b6894593a246b2e2b30b30b90b03aa95c7ceed1295da5f0f0dfe1029396402ae  mycroft-embedded-shell-c2855bffe17cd346397909bf84842eca2d15bd39.tar.gz
"
